package com;

public class FirstClass {

	public static void main(String[] args) {

		 
		 
		
		Car myFactoryCar = new Car();
		
		Car myFinalCar  =  myFactoryCar.createNewCar("HONDA", 1, 100);
		
		System.out.println(" My New Car details are  - "+myFinalCar.mode+ "  "+myFinalCar.name);
		
		 
		
		Car myFinalCar2  =  myFactoryCar.createNewCar("HONDA", 1, 100);
		
		System.out.println(" My New Car2 details are  - "+myFinalCar2.mode+ "  "+myFinalCar2.name);
		
		if (myFinalCar == myFinalCar2)
		{
			System.out.println("Same ");
		}else
		{
			System.out.println(" NOT Same");
		}
		 
		
		if(myFinalCar.equals(myFinalCar2))
		{
			System.out.println("Same ");
		}else
		{
			System.out.println(" NOT Same");
		}

	}

}
